package com.trippartner.client.menu.view;

import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.trippartner.client.menu.event.GlobalMenuCommandHandler;
import com.trippartner.client.pattern.HasCommand;

public class MyMenuItem extends MenuItem implements HasCommand {

	public MyMenuItem(SafeHtml html, Command cmd) {
		super(html, cmd);
	}

	public MyMenuItem(SafeHtml html, MenuBar subMenu) {
		super(html, subMenu);
	}

	public MyMenuItem(SafeHtml html) {
		super(html);
	}

	public MyMenuItem(String text, boolean asHTML, Command cmd) {
		super(text, asHTML, cmd);
	}

	public MyMenuItem(String text, boolean asHTML, MenuBar subMenu) {
		super(text, asHTML, subMenu);
	}

	public MyMenuItem(String text, Command cmd) {
		super(text, cmd);
	}

	public MyMenuItem(String text, MenuBar subMenu) {
		super(text, subMenu);
	}

	public void setCommandHandler(GlobalMenuCommandHandler commandHandler) {
		setCommand(commandHandler);
		
	}

	/** bof bof bizarre */
	public GlobalMenuCommandHandler getCommandHandler() {
		return (GlobalMenuCommandHandler) getCommand();
	}

}
